package cn.edu.sdjzu.xg.eagle.Service;

import cn.edu.sdjzu.xg.eagle.entity.Condition;
import cn.edu.sdjzu.xg.eagle.entity.Pagination;
import cn.edu.sdjzu.xg.eagle.entity.Teacher;
import cn.edu.sdjzu.xg.eagle.exception.BaseException;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.Collection;
import java.util.List;

public interface TeacherDaoService {

    //find()方法
    Teacher findTeacher(Long id) throws SQLException, BaseException;

    //findAll()方法
    Collection<Teacher> findTeachers() throws SQLException, BaseException;

    //分页查询
    Collection<Teacher> findTeachersWithPagination(List<Condition> condition, Pagination pagination,Connection connection) throws SQLException, BaseException;

    // findAllWithCondition()方法
    Collection<Teacher> findTeachersWithCondition(List<Condition> conditionList,Connection conn) throws SQLException, BaseException;


    //add()方法
    boolean addTeacher(Teacher teacher, Connection connection) throws SQLException, BaseException;

    //delete()方法
    boolean deleteTeacher(Long id,Connection connection) throws SQLException, BaseException;


    /**
     * 其他功能待完善
     */


}
